import { createStore, applyMiddleware } from 'redux'
import thunk from 'redux-thunk'
import { composeWithDevTools } from 'redux-devtools-extension'
import rootReducer from './reducers'
import { getToken } from '@/utils/token'

const middleware = composeWithDevTools(applyMiddleware(thunk))

const initalState = {
    login:getToken()
}
const store = createStore(rootReducer, initalState, middleware)

export default store
